<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>购物车</title>
    <link rel="stylesheet" href="/css/buy-cart.css">
    <link rel="shortcut icon" type="image/x-icon" media="all" href="/images/favicon.ico" />
</head>
<body>
    <div class="heart">
        <!-- header -->
        <div class="header">
            
        </div>
        <!-- Location -->
        <div class="Location"></div>

        <!-- step -->
        <ol class="step">
            <li class="change">1.购物车</li>
            <li>2.填写订单信息</li>
            <li>3.提交成功</li>
            <li>4.在线支付</li>
        </ol>
        <!-- nothing -->
        <div class="nothing" id="nothing-cart">
            <div class="wrap-box">
                <img src="/images/icon_cart.png">
                <div class="wrap-box-right">
                    <p>您的购物车还是空的</p>
                    <p>返回首页添加喜欢的产品吧!</p>
                    <a href="/index.html">返回首页</a>
                </div>
            </div>
        </div>
        <!-- 有东西时 -->
        <div class="CartProduct" id="cartProduct-show">
            <table border="0" class="cart-p-list" cellpadding="0">
                <thead>
                    <tr>
                        <th>
                            <input type="checkbox" class="checkall">
                            <span>全选</span>
                        </th>
                        <th>商品</th>
                        <th>单价</th>
                        <th>数量</th>
                        <th>操作</th>
                    </tr>
                </thead>
                <tbody id="cart-tbody">
                    
                </tbody>
                <script type="text/html" id="cart-tbody-template">
                    {{each cart shop}}
                    <tr data-id="{{shop.id}}">
                        <!-- 单选按钮 -->
                        <td>
                            <label class="check-labal">
                                <input type="checkbox" name="ids" class="check" {{shop.check? 'checked':''}}/>
                            </label>
                        </td>
                        <!-- 产品介绍 -->
                        <td>
                            <div class="cartlist-product">
                                <a href="/html/details.html?id={{shop.id}}"><img src="{{shop.img[0]}}"></a>
                                <div class="p-font">
                                    <strong><a href="/html/details.html?id={{shop.id}}">{{shop.title}}</a></strong>
                                    <p>规格：<span>{{shop.type[0]}}</span></p>
                                </div>
                            </div>
                        </td>
                        <!-- 单价 -->
                        <td>
                            <p>¥{{shop.price.toFixed(2)}}</p>
                        </td>
                        <!-- 数量加减 -->
                        <td>
                            <div class="num-calc">
                                <div class="reduce-num">-</div>
                                <div class="num-show">{{shop.count}}</div>
                                <div class="add-num">+</div>
                            </div>
                        </td>
                        <!-- 删除 -->
                        <td>
                            <a href="#" class="btn-del-p">移出</a>
                        </td>
                    </tr>
                    {{/each}}
                </script>
            </table>
            <!-- 计算价格 -->
            <div class="end-calc">
                <div class="calc-box">
                    <h3>订单合计</h3>
                    <dl>
                        <dt>商品数量总计:</dt>
                        <dd id="zhongji-count">1</dd>
                    </dl>
                    <dl>
                        <dt>商品金额总计(不含运费):</dt>
                        <dd id="zongji1">¥360.00</dd>
                    </dl>
                    <div class="zongji" id="zongji2">总计:&nbsp;&nbsp;&nbsp;&nbsp;¥360.00</div>
                    <div class="btn-rest">
                        <a href="#">结算</a>
                        <a href="/index.html">继续购物</a>
                    </div>
                </div>
            </div>
        </div>

        <!-- footer -->
        <footer>
            
        </footer>
    </div>
    <!-- 右侧购物车固定栏 -->
    <div class="floatbar">
        
    </div>
</body>
<script src="/libs/requirejs/require.min.js" data-main="/js/buy-cart"></script>
</html>